﻿/**
 * @file   FITKAbaqusAdaptorMaterialDamageInitiation.h
 * @brief 损伤材料
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date 2024-06-18
 */
#ifndef __FITKABAQUSADAPTORMATERIALDAMAGEINITIATION__H__
#define __FITKABAQUSADAPTORMATERIALDAMAGEINITIATION__H__

#include "FITKAbaqusAbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

 //前置声明
ForwardDeclarNS(AbaqusData, FITKDataCase)
ForwardDeclarNS(Interface, FITKAbaMaterial)
ForwardDeclarNS(Interface, FITKAbaMaterialJohnsonCookDamage)

namespace IO
{
    /**
     * @brief 损伤材料读写配置器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-06-17
     */
    class FITKAbaqusAdaptorMaterialDamageInitiation : public FITKAbaqusAbstractAdaptor
    {
    public:
        explicit FITKAbaqusAdaptorMaterialDamageInitiation() = default;
        ~FITKAbaqusAdaptorMaterialDamageInitiation() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        bool adaptW() override;

    private:
        /**
         * @brief 读取JohnsonCookDamage
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-18
         */
        bool readTypeJohnsonCookDamage();
        /**
         * @brief 写出JohnsonCookDamage
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-18
         */
        bool writeTypeJohnsonCookDamage();

    private:

        /**
         * @brief 材料数据
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-06-17
         */
        Interface::FITKAbaMaterial* _materialData{};
    };

    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaMaterialJohnsonCookDamage, FITKAbaqusAdaptorMaterialDamageInitiation)

}

#endif
